package com.andy.module.bean;

import androidx.annotation.NonNull;
import androidx.room.Entity;



import java.io.Serializable;

/**
 * 作者:wuwenliang
 * 创建时间:2019-12-18 20:14
 * 描述:code表
 */
@Entity(tableName = CodeBean.TABLE_NAME, primaryKeys = {"groupKey", "code"})
public class CodeBean implements Serializable {

    public static final String TABLE_NAME = "codeGroup";
    //分组关键字
    @NonNull
    private String groupKey;
    @NonNull
    private String code;//代码值
    private String value;//中文描述
    private String valueEn;//英文描述
    private int codeType;//码表类型 用于本地做区分
    public boolean select = false;//是否选择
    private int codeBiz;//code的基础业务信息 默认值为基础业务

    public String getGroupKey() {
        return groupKey;
    }

    public void setGroupKey(String groupKey) {
        this.groupKey = groupKey;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getValueEn() {
        return valueEn;
    }

    public void setValueEn(String valueEn) {
        this.valueEn = valueEn;
    }

    public int getCodeType() {
        return codeType;
    }

    public void setCodeType(int codeType) {
        this.codeType = codeType;
    }

    public boolean isSelect() {
        return select;
    }

    public void setSelect(boolean select) {
        this.select = select;
    }

    public int getCodeBiz() {
        return codeBiz;
    }

    public void setCodeBiz(int codeBiz) {
        this.codeBiz = codeBiz;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CodeBean codeBean = (CodeBean) o;

        if (code != null ? !code.equals(codeBean.code) : codeBean.code != null) return false;
        return value != null ? value.equals(codeBean.value) : codeBean.value == null;
    }

    @Override
    public int hashCode() {
        int result = code != null ? code.hashCode() : 0;
        result = 31 * result + (value != null ? value.hashCode() : 0);
        return result;
    }

}
